#example7_16.py
#coding=utf-8
import matplotlib.pyplot as plt
import pandas as pd

df=pd.read_excel('stock.xlsx',sheet_name='stock', usecols='B,E')

#为了显示中文，指定默认字体
plt.rcParams['font.sans-serif'] = ['SimHei']

df.plot(kind='box')  #kind='box'指定箱线图
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
plt.grid()
plt.title('开盘价与收盘价')
plt.show()

